
# 基于最新版的NODE容器创建
FROM node:latest
# MAINTAINER waterchestnut "docker@waterchestnut.com"

# 安装pm2的插件webshell，方便在容器外直接管理node和pm2
# RUN npm install -g pm2@latest koa koa-compress koa-mount koa-static koa-websocket koa2-proxy-middleware nodemon

# 映射nodejs可执行文件的目录
# VOLUME ["/web"]

WORKDIR /usr/app
# 复制容器的执行脚本
# COPY ["./dist", "./server.js", "./serverHelper.js", "/web/"] 
COPY . .

# 暴露端口映射
EXPOSE 80
EXPOSE 443
EXPOSE 7001

CMD [ "npm", "run", "pm2-start-docker" ]